package controller;


import com.lesso.zqz.sunflower.pojo.dto.EmployeeDTO;
import com.lesso.zqz.sunflower.service.IEmployeeService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 员工基础信息 前端控制器
 * </p>
 *
 * @author zqz
 * @since 2025-07-02
 */
@RestController
@RequestMapping("/base/employee")
public class EmployeeController {
    @DubboReference
    private IEmployeeService employeeService;

    @PostMapping
    public ResponseEntity<Integer> save(@RequestBody EmployeeDTO dto) {
        return ResponseEntity.ok(employeeService.save(dto));
    }
}
